Add numba dispatch for SVD#2136
Conversation
What about https://en.wikipedia.org/wiki/CUR_matrix_approximation https://en.wikipedia.org/wiki/Interpolative_decomposition https://en.wikipedia.org/wiki/Polar_decomposition https://en.wikipedia.org/wiki/Category:Matrix_decompositions |
| if discrete_input: | ||
| x = x.astype(out_dtype) | ||
| return np.linalg.svd(x, full_matrices) | ||
| return _svd_gesdd_full( |
There was a problem hiding this comment.
worth a (one time) bench we are doing better than the numba dispatch?
| op = svd.SVD( | ||
| full_matrices=full_matrices, | ||
| compute_uv=compute_uv, | ||
| overwrite_a=overwrite_a, |
There was a problem hiding this comment.
I suggest using the actual inplace path with requires starting with a regular Blockwise and just seeing the root input as mutable. Then check the destroy map of the compiled function?
There was a problem hiding this comment.
so not starting with inplace graph
There was a problem hiding this comment.
I pushed a commit with this, check if you're happy
There's also https://en.wikipedia.org/wiki/Cholesky_decomposition#LDL_decomposition You are right though, I have a long and fruitful career of implementing matrix decompositions that nobody asked for still stretching out ahead of me. Bullet dodged! |
|
Did I break mypy? |
|
maybe just a new failure due to the settings? Looks like its firing fine, i can just fix it here. |
thanks |
Fun fact, there are no decompositions left for me to implement when i'm bored.